/**
 * This file is part of codzo-freelance-timetracking.
 * 
 * codzo-freelance-timetracking is free software: you can
 * redistribute it and/or modify it under the terms of the GNU
 * General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your
 * option) any later version.
 * 
 * codzo-freelance-timetracking is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
 * Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with codzo-freelance-timetracking. If not, see
 * <http://www.gnu.org/licenses/>.
 */

#include <wx/sizer.h>

#include "main/browserwindow.h"
#include "icons/app.ico-16.xpm"

MainBrowserWindow::MainBrowserWindow( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxFlexGridSizer* fgSizer2;
	fgSizer2 = new wxFlexGridSizer( 1, 1, 0, 0 );
	fgSizer2->AddGrowableCol( 0 );
	fgSizer2->AddGrowableRow( 0 );
	fgSizer2->SetFlexibleDirection( wxBOTH );
	fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	fgSizer2->SetMinSize( wxSize( 600,400 ) ); 
	
	m_webview = wxWebView::New(
		this,
		(wxWindowID)wxID_ANY,
		"http://netbank.com.au/"
	) ;

	fgSizer2->Add( m_webview, 0, wxALL|wxEXPAND, 5 );
	
	this->SetSizer( fgSizer2 );
	this->Layout();
	fgSizer2->Fit( this );


    SetIcon(app_ico_xpm_16);
}

MainBrowserWindow::~MainBrowserWindow()
{
	if(m_webview)
	{
		m_webview->Destroy();
	}
}

